package ibm.websphere.monitor.bean;

import java.util.List;

/**
 * Created by zhouyang on 2016/1/14.
 */
public class ThreadInfo  implements java.io.Serializable {

    private Long id;
    /**并发活动的线程数**/
    private Long ActiveCount;

    /**清除停止的线程数**/
    private Long ClearedThreadHangCount;

    /**并发停止的线程数**/
    private Long ConcurrentHungThreadCount;

    /**创建线程的总数**/
    private Long CreateCount;

    /**声明停止的线程数**/
    private Long DeclaredThreadHungCount;

    /**销毁线程的总数**/
    private Long DestroyCount;

    /**所有线程的平均使用时间百分比**/
    private Long PercentMaxed;

    /**正在使用的池的平均百分率**/
    private Long PercentUsed;

    /**池中线程的平均数**/
    private Long PoolSize;

    /**采集数据的时间**/
    private String currentDate;

    /**采集数据的SERVER名**/
    private String serverName;

    /**预留字段**/
    private Long type;

    public ThreadInfo(){}

    public ThreadInfo(Long id, Long activeCount, Long clearedThreadHangCount, Long concurrentHungThreadCount, Long createCount, Long declaredThreadHungCount, Long destroyCount, Long percentMaxed, Long percentUsed, Long poolSize, String currentDate, String serverName, Long type) {
        this.id = id;
        ActiveCount = activeCount;
        ClearedThreadHangCount = clearedThreadHangCount;
        ConcurrentHungThreadCount = concurrentHungThreadCount;
        CreateCount = createCount;
        DeclaredThreadHungCount = declaredThreadHungCount;
        DestroyCount = destroyCount;
        PercentMaxed = percentMaxed;
        PercentUsed = percentUsed;
        PoolSize = poolSize;
        this.currentDate = currentDate;
        this.serverName = serverName;
        this.type = type;
    }

    public ThreadInfo(List arrayList) {
        this.id = Long.parseLong(arrayList.get(0).toString());
        ActiveCount = Long.parseLong(arrayList.get(1).toString());
        ClearedThreadHangCount = Long.parseLong(arrayList.get(2).toString());
        ConcurrentHungThreadCount = Long.parseLong(arrayList.get(3).toString());
        CreateCount = Long.parseLong(arrayList.get(4).toString());
        DeclaredThreadHungCount = Long.parseLong(arrayList.get(5).toString());
        DestroyCount = Long.parseLong(arrayList.get(6).toString());
        PercentMaxed = Long.parseLong(arrayList.get(7).toString());
        PercentUsed = Long.parseLong(arrayList.get(8).toString());
        PoolSize = Long.parseLong(arrayList.get(9).toString());
        this.currentDate = arrayList.get(10).toString();
        this.serverName = arrayList.get(11).toString();
        this.type = Long.parseLong(arrayList.get(12).toString());
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getActiveCount() {
        return ActiveCount;
    }

    public void setActiveCount(Long activeCount) {
        ActiveCount = activeCount;
    }

    public Long getClearedThreadHangCount() {
        return ClearedThreadHangCount;
    }

    public void setClearedThreadHangCount(Long clearedThreadHangCount) {
        ClearedThreadHangCount = clearedThreadHangCount;
    }

    public Long getConcurrentHungThreadCount() {
        return ConcurrentHungThreadCount;
    }

    public void setConcurrentHungThreadCount(Long concurrentHungThreadCount) {
        ConcurrentHungThreadCount = concurrentHungThreadCount;
    }

    public Long getCreateCount() {
        return CreateCount;
    }

    public void setCreateCount(Long createCount) {
        CreateCount = createCount;
    }

    public Long getDeclaredThreadHungCount() {
        return DeclaredThreadHungCount;
    }

    public void setDeclaredThreadHungCount(Long declaredThreadHungCount) {
        DeclaredThreadHungCount = declaredThreadHungCount;
    }

    public Long getDestroyCount() {
        return DestroyCount;
    }

    public void setDestroyCount(Long destroyCount) {
        DestroyCount = destroyCount;
    }

    public Long getPercentMaxed() {
        return PercentMaxed;
    }

    public void setPercentMaxed(Long percentMaxed) {
        PercentMaxed = percentMaxed;
    }

    public Long getPercentUsed() {
        return PercentUsed;
    }

    public void setPercentUsed(Long percentUsed) {
        PercentUsed = percentUsed;
    }

    public Long getPoolSize() {
        return PoolSize;
    }

    public void setPoolSize(Long poolSize) {
        PoolSize = poolSize;
    }

    public String getCurrentDate() {
        return currentDate;
    }

    public void setCurrentDate(String currentDate) {
        this.currentDate = currentDate;
    }

    public String getServerName() {
        return serverName;
    }

    public void setServerName(String serverName) {
        this.serverName = serverName;
    }

    public Long getType() {
        return type;
    }

    public void setType(Long type) {
        this.type = type;
    }
}
